#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>

using namespace std;

//class A
//{
//public:
//	A(int a = 0)
//	{
//		a = 1;
//		cout << "A()" << endl;
//	}
//	A(const A& aa)
//	{
//		cout << "A(const A&)" << endl;
//	}
//	~A()
//	{
//		cout << "~A()" << endl;
//		
//	}
//private:
//	int a;
//
//};

class stack
{
public:
	stack()
	{
		p1 = new int[4];
	    top = 0;
		capacity = 4;
	}
	~stack()
	{
		free(p1);
		top = capacity = 0;
	}
private:
	int* p1;
	int top;
	int capacity;
};

//int main()
//{
//	A a2(1);
//	A a1 = a2;
//	return 0;
//}


int main()
{
	/*int* p1 = new int;
	int* p2 = new int(1);
	delete p1;
	delete p2;

	int* p3 = new int[10];
	int* p4 = new int[10]{ 1,2,3,4 };

	delete p3;
	delete[] p4;*/

	//A* pa = new A;

	stack* pst = new stack;
	
	//pst++;
	
	
	//free(pst);


	delete pst;




	return 0;
}